#sm2
rm *.bin
./powerup
./startup
./createprimary -hi p -ecc sm2p256 -st -pwdk sto  -tk tk.bin -ch ch.bin -halg sm3 -nalg sm3
./create -hp 80000000 -ecc sm2p256 -si -halg sm3 -kt f -kt p -opr signeccpriv.bin -opu signeccpub.bin  -pwdp sto -pwdk sig -nalg sm3
./load -hp 80000000 -ipr signeccpriv.bin -ipu signeccpub.bin -pwdp sto
./sign -hk 80000001 -halg sm3 -salg sm2 -if policies/aaa -os sig.bin -pwdk sig 
./verifysignature -hk 80000001 -halg sm3 -ecc -if policies/aaa -is sig.bin 
./flushcontext -ha 80000001

#sm3
./hash -halg sm3 -ic feiteng -ns

#sm4

./create -hp 80000000 -sm4 -halg sm3 -kt f -kt p -opr despriv.bin -opu despub.bin -pwdp sto -pwdk aes -nalg sm3
./load -hp 80000000 -ipr despriv.bin -ipu despub.bin -pwdp sto  
echo 1234 > msg.bin
./encryptdecrypt -hk 80000001 -if msg.bin -of enc.bin -pwdk aes 
./encryptdecrypt -hk 80000001 -d -if enc.bin -of dec.bin -pwdk aes
diff msg.bin dec.bin
rm *.bin
./flushcontext -ha 80000001
./flushcontext -ha 80000000

